Creating a Chroot (mkchakraroot)
LiveCD creation is a very messy process, requiring lots of programs to be installed and configuration to be made. Also, these configurations could be incompatible with the host system! Therefore, creating a chroot jail is quite useful. A chroot simply changes the apparent root directory for the programs inside it, preventing them from messing with the real filesystem.
Chakra-based distros
If you have a Chakra-based system (Cherimoya is one of them), just use these commands to create your chroot:
pacman -S base base-devel nano vi vim rsync pacman file wget mkchakraroot /tmp/chroot base
Then, use this command anywhere to enter the chroot:
mkchakraroot -r bash /tmp/chroot
Other Linux distros
If you don't have a Chakra based system you first have to install your basic development packages along with wget and git before proceeding.
To create a chroot using the source code of Chakra-Live, use these commands:
git clone git://gitorious.org/chakra/chakra-live.git cd chakra-live/mkchakraroot ./mkchakraroot /tmp/chroot base
Make sure you are in that same directory, and you can use this command to enter the chroot at anytime:
./mkchakraroot -r bash /tmp/chroot
Post-install Configuration
The chroot does not have any uncommented mirrors in /etc/pacman.d/mirrorlist, so you'll have to set them manually each time.
First, open /etc/pacman.d/mirrorlist, remove the "#" from the mirror server you want, and replace <arch> with either "i686" or "x86_64", depending on your chroot's architecture. The file should then look something like this:
Get all of Chakra-Live's dependencies with this command:
pacman -S git squashfs-tools syslinux chakra-live cdrkit make nbd mkinitcpio-nfs-utils ccr
After that, open /etc/pacman.conf and add these lines to the bottom of it:
Include = /etc/pacman.d/cherimoya-mirrorlist
[cherimoya-firefox] Include = /etc/pacman.d/cherimoya-mirrorlist
[offense] Include = /etc/pacman.d/cherimoya-mirrorlist
[defense] Include = /etc/pacman.d/cherimoya-mirrorlist</pre<noinclude></noinclude>>
Then, make the file /etc/pacman.d/cherimoya-mirrorlist, and put this in it (replace i686 with x86_64 if building 64-bit...):
Finally, get our Chakra-Live profile and update the database at the same time.
pacman -Syy cherimoya-profiles
Your chroot is ready! All steps below this should always be done inside this chroot.